<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProjectPhoto.aspx.cs" Inherits="Admin_ProjectPhoto" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Choose a Photo</title>
</head>
<body>

<script language="javascript">
window.resizeTo(450,600) ;
</script>
    <form id="form1" runat="server">
    <div align="center">

		<div >
			<h4>Photos in This Album</h4>
			<p>The following are the photos	currently in this album.</p>
			<asp:gridview id="GridView1" runat="server" datasourceid="ObjectDataSource1" 
				datakeynames="PhotoID" cellpadding="6" EnableViewState="False"
				autogeneratecolumns="False" BorderStyle="None" BorderWidth="0px" width="420px" showheader="False" AllowPaging="True" >
				<EmptyDataRowStyle CssClass="emptydata"></EmptyDataRowStyle>
				<EmptyDataTemplate>
					You currently have no photos.
				</EmptyDataTemplate>
				<columns>
					<asp:TemplateField>
						<ItemStyle Width="50px" />
						<ItemTemplate>
							<table border="0" cellpadding="0" cellspacing="0" class="photo-frame">
								<tr>
									<td class="topx--"></td>
									<td class="top-x-"></td>
									<td class="top--x"></td>
								</tr>
								<tr>
									<td class="midx--"></td>
									<td><a href='ProjectPhotoDetails.aspx?AlbumID=<%# Eval("AlbumID") %>&Page=<%# ((GridViewRow)Container).RowIndex %>'>
										<img src='../Handler.ashx?Size=S&PhotoID=<%# Eval("PhotoID") %>' class="photo_198" style="border:2px solid white;width:50px;" alt='Thumbnail of Photo Number <%# Eval("PhotoID") %>' /></a></td>
									<td class="mid--x"></td>
								</tr>
								<tr>
									<td class="botx--"></td>
									<td class="bot-x-"></td>
									<td class="bot--x"></td>
								</tr>
							</table>
						</ItemTemplate>
					</asp:TemplateField>
					<asp:boundfield headertext="Caption" datafield="Caption" />
                    <asp:TemplateField>
                        <ItemTemplate>
                            <!--input id="Button1" type="button" value="Select" onclick="window.opener.document.forms[0].elements['ctl00_Main_hfiThumbID'].value =<%# Eval("PhotoID") %>;window.opener.SetImage(<%# Eval("Caption").ToString() %>);window.close();" /-->
                            <input id="Button2" type="button" value="Select" onclick="window.opener.document.forms[0].elements['ctl00_Main_hfiThumbID'].value =<%# Eval("PhotoID") %>;window.opener.SetImage(<%# Eval("PhotoID") %>);window.close();" />
                        </ItemTemplate>
                    </asp:TemplateField>
					
				</columns>
			</asp:gridview>
		</div>

	 </div>
	
	<asp:ObjectDataSource ID="ObjectDataSource1" Runat="server" TypeName="PhotoManager" 
		SelectMethod="GetPhotos" >
		<SelectParameters>
			<asp:QueryStringParameter Name="AlbumID" Type="Int32" QueryStringField="AlbumID" />
		</SelectParameters>
		<InsertParameters>
			<asp:QueryStringParameter Name="AlbumID" Type="Int32" QueryStringField="AlbumID" />
		</InsertParameters>
	</asp:ObjectDataSource>
	 
    </form>
</body>
</html>
